package org.example.controller;

import com.baomidou.dynamic.datasource.annotation.DS;
import org.example.dto.Dog;
import org.example.mapper.DogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/dy2")
public class TestController {

    @Autowired
    private DogMapper dogMapper;

    @RequestMapping("x")
    public List<Dog> findDogs(){
        return dogMapper.findList();
    }

    @DS("hs")
    @RequestMapping("y")
    public List<Dog> findDogs1(){
        return dogMapper.findList();
    }
}
